package com.jing.weibo.mapper.fans;

import java.util.List;

import com.jing.weibo.pojo.fans.Fansattention;

/**
 * 用户同步记录的Mapper
 * @author jing.yue
 * @version 2012/08/30 1.0.0
 */
public interface FansAttentionMapper {

	/**
	 * 根据用户名和粉丝的用户名获取数据库中的信息[不能获取到类型的信息, 有可能获取2条记录, 这里只返回第一条记录]
	 * @param fansattention
	 * @return
	 * @throws Exception
	 */
	public abstract List<Fansattention> findByUsernameFansname(Fansattention fansattention) throws Exception;

	/**
	 * 根据用户名和粉丝的用户名和类型修改信息
	 * @param fansattention
	 * @throws Exception
	 */
	public abstract void updateFansattention(Fansattention fansattention) throws Exception;

	/**
	 * 保存粉丝信息
	 * @param fansattention
	 * @throws Exception
	 */
	public abstract void saveFansattention(Fansattention fansattention) throws Exception;

	/**
	 * 根据用户和类型删除历史记录
	 * @param fansattention
	 * @throws Exception
	 */
	public abstract void deleteFansattention(Fansattention fansattention) throws Exception;

	/**
	 * 分页获取用户的关注
	 * @param fansattention
	 * @return
	 * @throws Exception
	 */
	public abstract List<Fansattention> findAttention(Fansattention fansattention) throws Exception;

	/**
	 * 分页获取用户的关注的记录数
	 * @param fansattention
	 * @return
	 * @throws Exception
	 */
	public abstract Integer findAttentionCount(Fansattention fansattention) throws Exception;

	/**
	 * 根据类型/用户名/关注的用户删除记录
	 * @param fansattention
	 * @throws Exception
	 */
	public abstract void deleteAttentionByTypeUsernameFausername(Fansattention fansattention) throws Exception;

	/**
	 * 分页获取用户的粉丝
	 * @param fansattention
	 * @return
	 * @throws Exception
	 */
	public abstract List<Fansattention> findFans(Fansattention fansattention) throws Exception;

	/**
	 * 分页获取用户的粉丝的记录数
	 * @param fansattention
	 * @return
	 * @throws Exception
	 */
	public abstract Integer findFansCount(Fansattention fansattention) throws Exception;

	/**
	 * 根据用户名和粉丝的用户名和类型修改粉丝关系信息
	 * @param fansattention
	 * @throws Exception
	 */
	public abstract void updateFansattentionFollow(Fansattention fansattention) throws Exception;

	/**
	 * 根据用户名和粉丝的用户名和类型获取数据库中的信息
	 * @param fansattention
	 * @return
	 * @throws Exception
	 */
	public abstract List<Fansattention> findByUsernameFansnameType(Fansattention fansattention) throws Exception;
}